<?php
header("Content-type:text/html;charset=utf-8;");
$remote = $_SERVER['REMOTE_ADDR'];
$write = $remote . '|' . date('Y-m-d H:i:s');
$str = file_get_contents('record.txt');
$clickcount = 1;
if($str){
$rows = explode("\r\n",$str);
$count = count($rows) + 1;
foreach($rows as $value){
$ip = explode("|",$value);
if($ip[0] == $remote){
$clickcount++;
}
}
$write = "\r\n" . $write;
}else{
$count = 1;
}
file_put_contents('record.txt',$write,FILE_APPEND);
?>
<?php
require_once("./functions.php");


$datetime = date("Y-m-d h:i:s", time()); //时间


//接受邮件的邮箱地址
//$email='example@address.com';
//多邮件示例
$email = '2121274686@qq.com'; //此处填写管理员邮箱以监控邮件记录

//$subject为邮件标题
$subject = '反馈工单';

$certno = '管理员:\r于桌' . $_GET['deskname'] . '收到用户' . $_GET['user'] . '反馈，此桌有' . $_GET['act'] . '行为，请立即处理！';
$content = $certno;



//执行发信
$flag = sendMail($email,$subject,$content);
//判断是否重复提交！
if($flag)
{
    //发送成功
    $data =  '{"Code":"1","msg":"发送成功!"}';
    echo $data;
    exit();
}else{
    //发送失败
    $data =  '{"Code":"-1","msg":"Error!发送失败QAQ"}';
    echo $data;
    exit();

}